package com.xinshujia.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinshujia.dao.ResourceDao;
import com.xinshujia.entity.ResourceEntity;
import com.xinshujia.service.ResourceService;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * *************************************
 * *   @author: 野狼上校               **
 * *   @since: 2024-07-12 09:18       **
 * *   @version: 1.0                  **
 * *************************************
 * <p>
 * 资源实现业
 */
@Service
public class ResourceServiceImpl extends ServiceImpl<ResourceDao, ResourceEntity> implements ResourceService {
    private final ResourceDao resourceDao;

    public ResourceServiceImpl(ResourceDao resourceDao) {
        this.resourceDao = resourceDao;
    }


    /**
     * 根据角色ids查询资源
     */
    @Override
    public Set<ResourceEntity> findResourcesByRIds(Set<Long> roleIds) {
        return resourceDao.findResourcesByRIds(roleIds);
    }
}
